#pragma once

#include <Windows.h>
#include <shellapi.h>
#include "hook.h"
#include "log.h"
#include "registry.h"
#include "trayicon.h"

//------------------------------------------------------
//macros
//------------------------------------------------------

#define ScrollPPEnabledToolTip L"Scroll++ enabled."
#define ScrollPPDisabledToolTip L"Scroll++ disabled."

#define REG_KEY_Options L"SOFTWARE\\ScrollPP\\Options"
#define REG_DisableScrollPP L"DisableScrollPP"

//------------------------------------------------------
//variables
//------------------------------------------------------

UINT WM_TASKBARCREATED;

BOOL _disableScrollPP = TRUE;
BOOL _isTrayIconLMouseButtonDown = FALSE;

HWND hWnd = NULL;
HANDLE hMutex = NULL;

NOTIFYICONDATA _iconData;

//------------------------------------------------------
//functions
//------------------------------------------------------
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);

DWORD CALLBACK ExitMutexProc(LPVOID);
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);

void ParseForArguments();
void LoadSettings();
HWND InitializeWindow(HINSTANCE hInstance);
void ShutdownWindow();

void InitializeTrayIcon();
void UpdateTrayIcon();